package com.xingyi.bacs.vo;

/**
 * 通信
 * @author lenovo
 *
 */
public class ResponeBodyVo {
	
	public static final int SUCCESS = 0;//成功
	public static final int ERROR = -1;//请求错误
	public static final int UNAUTHORIZED = -2;//未授权
	public static final int PARM_ERROR = -3;//参数有误
	public static final int BUZY = -4;//系统忙
	public static final int SECURITY_NO = -5;//没有权限
	public static final int NO_DATA = -6;//没有数据
 
	public ResponeBodyVo() {
	}
	public ResponeBodyVo(int errorCode) {
		super();
		this.errorCode = errorCode;
	}
	public ResponeBodyVo(Object data) {
		super();
		this.data = data;
	}	
	public ResponeBodyVo(int errorCode, String errorMsg) {
		super();
		this.errorCode = errorCode;
		this.errorMsg = errorMsg;
	}
	public ResponeBodyVo(int errorCode, Object data, String errorMsg) {
		super();
		this.errorCode = errorCode;
		this.data = data;
		this.errorMsg = errorMsg;
	}
	/**
	 * 错误码  0表示成功
	 */
	private int errorCode =0;
	/**
	 * 返回数据
	 */
	private Object data;
	/**
	 * 错误消息
	 */
	private String errorMsg;
	/**
	 *时间戳
	 */
	private long timestamp = System.currentTimeMillis();

	public int getErrorCode() {
		return errorCode;
	}
	public void setErrorCode(int errorCode) {
		this.errorCode = errorCode;
	}
	public Object getData() {
		return data;
	}
	public void setData(Object data) {
		this.data = data;
	}
	public String getErrorMsg() {
		return errorMsg;
	}
	public void setErrorMsg(String errorMsg) {
		this.errorMsg = errorMsg;
	}
	public long getTimestamp() {
		return timestamp;
	}
	public void setTimestamp(long timestamp) {
		this.timestamp = timestamp;
	}
	
	@Override
	public String toString() {
		return "ResponeBodyVo [errorCode：" + errorCode + ", data：" + data
				+ ", errorMsg：" + errorMsg + ", timestamp：" + timestamp + "]";
	}
	
}
